<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link   href="../../resource/layui2.6.8/css/layui.css" rel="stylesheet">
    <script  src="../../resource/js/jquery2.2.js"></script>
    <script  src="../../resource/layui2.6.8/layui.js"></script>
    <script  src="../../resource/layui2.6.8/layui.custom.js"></script>
</head>
<body>
<div style="margin-top: 50px" class="layui-row">
    <div class="layui-col-sm5 layui-col-sm-offset1">
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 150px">任务名称</label>
            <div class="layui-input-block" style="margin-left: 200px">
                <input  value="" type="text" name="taskName" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-col-sm6">
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 120px">目标url</label>
            <div class="layui-input-block" style="margin-left: 160px">
                <input  value="" type="text" name="targetUrl" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
</div>

</body>
<script>
    function callback(){
        let data={}
        $("input").each(function () {
            data[$(this).attr("name")]=$(this).val()
        });
        return data;
    }
</script>
</html>